package c.h.b.c.b;

import android.app.Activity;
import android.content.Intent;
import com.huawei.hms.jos.AppUpdateClient;
import com.huawei.updatesdk.service.appmgr.bean.ApkUpgradeInfo;
import com.huawei.updatesdk.service.otaupdate.CheckUpdateCallBack;
import com.huawei.updatesdk.service.otaupdate.UpdateKey;
import java.io.Serializable;

/* compiled from: HwUpdateChecker */
public class a implements CheckUpdateCallBack {
    public final /* synthetic */ AppUpdateClient a;
    public final /* synthetic */ Activity b;

    public a(b bVar, AppUpdateClient appUpdateClient, Activity activity) {
        this.a = appUpdateClient;
        this.b = activity;
    }

    public void onMarketInstallInfo(Intent intent) {
    }

    public void onMarketStoreError(int i) {
    }

    public void onUpdateInfo(Intent intent) {
        if (intent != null) {
            intent.getIntExtra("status", -1);
            intent.getIntExtra(UpdateKey.FAIL_CODE, -1);
            intent.getStringExtra(UpdateKey.FAIL_REASON);
            Serializable serializableExtra = intent.getSerializableExtra(UpdateKey.INFO);
            if (serializableExtra instanceof ApkUpgradeInfo) {
                this.a.showUpdateDialog(this.b, (ApkUpgradeInfo) serializableExtra, false);
            }
        }
    }

    public void onUpdateStoreError(int i) {
    }
}
